﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using HCMServices.BUS;
using HCMServices.DTO;

namespace HCMServices.Tests.TESTBUS
{
    /// <summary>
    /// Unit test for SearchEngine class
    /// </summary>
    [TestClass]
    public class TestSearchEngine
    {
        /// <summary>
        /// Unit test for GetFilterInfo() in SearchEngine class
        /// </summary>
        [TestMethod]
        public void TetsGetFilterInfo()
        {
            SearchEngine searchEngine = new SearchEngine();
            List<string> lstInfo = new List<string>();
            List<DataDTO> listData = new List<DataDTO>();
            DataDTO temp = new DataDTO();
            temp.CityId = 19;
            listData.Add(temp);
            lstInfo = searchEngine.GetFilterInfo(listData, 0);
            if (lstInfo[0] == "Tất cả đường")
            {
                Assert.IsTrue(true);
                return;
            }

            Assert.IsFalse(true);
        }

        /// <summary>
        /// Unit test for GetForDataToResult() in SearchEngine class
        /// </summary>
        [TestMethod]
        public void TestGetForDataDTOResult()
        {
            SearchEngine searchEngine = new SearchEngine();
            List<DataDTO> listData = new List<DataDTO>();

            listData = searchEngine.SearchForDataDTOResult("atm");

            if (5 == listData[0].ServiceId)
            {
                Assert.IsTrue(true);
                return;
            }

            Assert.IsFalse(true);
        }

        /// <summary>
        /// Unit test for GetForHardDataToResult() in SearchEngine class
        /// </summary>
        //[TestMethod]
        //public void TestGetForHardDataDTOResult()
        //{
        //    SearchEngine searchEngine = new SearchEngine();
        //    List<HardDataDTO> listHardData = new List<HardDataDTO>();

        //    listHardData = searchEngine.SearchForHardDataDTOResult("atm");

        //    if ("ATM" == listHardData[0].ServiceName)
        //    {
        //        Assert.IsTrue(true);
        //        return;
        //    }

        //    Assert.IsFalse(true);
        //}
    }
}
